<!--
  ~ Copyright (C) 2010 Brockmann Consult GmbH (info@brockmann-consult.de)
  ~
  ~ This program is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU General Public License as published by the Free
  ~ Software Foundation; either version 3 of the License, or (at your option)
  ~ any later version.
  ~ This program is distributed in the hope that it will be useful, but WITHOUT
  ~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  ~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  ~ more details.
  ~
  ~ You should have received a copy of the GNU General Public License along
  ~ with this program; if not, see http://www.gnu.org/licenses/
  -->

<html>
<head>
    <title>Sentinel Toolbox Help - Create Filtered Band</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link rel="stylesheet" href="../style.css">
</head>

<body>

<table class="header">
    <tr class="header">
        <td class="header">&nbsp;
            Create Filtered Band
        </td>
        <td class="header" align="right"><a href="../general/overview/SnapOverview.html"><img src="../images/snap_header.jpg"
                                                                                     border=0></a></td>
    </tr>
</table>

<h3>Create Filtered Band</h3>

<p>Filtered bands are created either by applying a filter operation to the underlying raster data of a given source
    band.
    The term <em>filtering</em> is used here in a narrow sense, meaning that a target pixel value is computed from the
    N x M pixel neighborhood of a corresponding source pixel.
    The Sentinel Toolbox supports basically two types of image filters, linear and non-linear filters:</p>

<p><strong>Linear filters (Convolution):</strong> A target pixel is computed by element-wise multiplication of the N x M source
    pixel neighborhood with a given N x M convolution kernel.</p>

<p><strong>Non-linear filters:</strong> A target pixel is computed by applying a non-linear function (such as min, max, or median)
    to all source pixels of a N x M neighborhood. The pixels within the N x M neighborhood may be selected by a N x M
    Boolean kernel mask, turning the operation into a <em>morphological filter</em>. In this case the (Boolean)
        kernel acts as the filter's <i>structuring element</i>.
</p>

<p>Image filters take full advantage of the no-data / valid-mask properties of a given source band.
    If the source pixel is a no-data pixel or if no-data pixels are encountered in its neighborhood,
    the target pixel will also become a no-data pixel (value will be NaN).</p>

<h4>Pre-defined Filters</h4>

<p>SNAP has the following pre-defined filters:</p>

<ul>
    <li><strong>Detect Lines</strong>: Horizontal Edges, Vertical Edges, Diagonal Edges, Compass Edge Detector, Roberts Cross</li>
    <li><strong>Detect Gradients (Emboss)</strong>: Sobel</li>
    <li><strong>Smooth and Blurr</strong>: Arithmetic Mean, Low-Pass</li>
    <li><strong>Sharpen</strong>: High-Pass</li>
    <li><strong>Enhance Discontinuities</strong>: Laplace</li>
    <li><strong>Non-Linear Filters</strong>: Minimum, Maximum, Mean, Median, Standard Deviation</li>
    <li><strong>Morphological Filters</strong>: Erosion, Dilation, Opening, Closing</li>
</ul>

<h4>User-defined Filters</h4>

<p>Users can define their own linear, non-linear, or morphological filters.</p>

<h4>Example images</h4>

<p align="center">
<table align="center">
    <tr>

        <td><img src="images/FilterCompassEdgeDetector.jpg" border=0 align="middle" width="491" height="368">

            <p align="center">Compass Edge Detector Filter</p>
        </td>

        <td><img src="images/FilterLowPass5x5.jpg" border=0 align="middle" width="491" height="368"><br>

            <p align="center">Low-Pass 5x5 Filter</p>
        </td>
    </tr>
    <tr>

        <td><img src="images/FilterHighPass3x3_2.jpg" border=0 align="middle" width="491" height="368">

            <p align="center">High-Pass 3x3 #2 Filter</p>
        </td>

        <td><img src="images/FilterLaplace3x3.jpg" border=0 align="middle" width="491" height="368">

            <p align="center">Laplace 3x3</p>
        </td>
    </tr>
</table>
<br>
<br>
<hr>

</body>
</html>

